package com.woniuxy.house.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.woniuxy.entity.house.Newhouse;
import com.woniuxy.entity.house.dto.HouseInfoDto;
import com.woniuxy.entity.house.dto.HouseTypeInfoDto;
import com.woniuxy.entity.house.dto.SelectHouseDto;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author liangyu
 * @since 2021-03-19
 */
public interface NewhouseService extends IService<Newhouse> {
    //通过新房id查询新房
    public Newhouse findNewHouseById(int id);
    //通过楼盘id查询所有新房
    public List<Newhouse> findNewHousesByBuildingId(int id);
    //新房上架
    public boolean insertNewhouseToBuilding(Newhouse newhouse);
    //新房成交下架
    public boolean deleteNewHouse(int id);
    //修改新房信息
    public boolean updateInfo(Newhouse newhouse);
    //条件分页查询新房
    public List<HouseTypeInfoDto> findByCondictions(int current, int size, SelectHouseDto selectHouseDto);
    //修改房屋状态
    boolean updateById(int id);
}
